* This file replicates the empirical analysis presented in "Alliance Treaty Obligations and War Intervention"
* Jesse C. Johnson
* 5/9/17
	

set more off
set matsize 800
use "JohnsonCMPSrep.dta", clear

* Table 1

	sum intervention offense defense ln_distance icontr tcontr i_win i_demdiff t_demdiff if i_demdiff~=. & t_demdiff~=.

* Table 2

	mlogit intervention offense defense, tech(bfgs) 

	mlogit intervention offense defense ln_distance icontr tcontr i_win i_demdiff t_demdiff, tech(bfgs)
		
* Table 3

	mlogit intervention offense defense ln_distance icontr tcontr i_demdiff t_demdiff war1-war95 if bilateral~=1, tech(bfgs)

	mlogit intervention offense defense ln_distance icontr tcontr i_win i_demdiff t_demdiff pi1-pi213 if nojoin~=1, tech(bfgs)

******************************************************************************************************************************

* Appendix

* Table A1

	mlogit intervention offense defense if polrel==1, tech(bfgs) 

	mlogit intervention offense defense ln_distance icontr tcontr i_win i_demdiff t_demdiff if polrel==1, tech(bfgs)

* Table A2

	estpost correlate offense defense ln_distance icontr tcontr i_win i_demdiff t_demdiff, matrix
	
* Table A3

	mlogit intervention offense defense if warnum~=82 & warnum~=221 & warnum~=225 & warnum~=227, tech(bfgs) 

	mlogit intervention offense defense ln_distance icontr tcontr i_win i_demdiff t_demdiff if warnum~=82 & warnum~=221 & warnum~=225 & warnum~=227 , tech(bfgs)
	
* Table A4

	mlogit intervention offense defense if warnum~=170 & warnum~=186 & warnum~=215, tech(bfgs) 

	mlogit intervention offense defense ln_distance icontr tcontr i_win i_demdiff t_demdiff if warnum~=170 & warnum~=186 & warnum~=215, tech(bfgs)
	
* Table A5

	mlogit intervention2 offense defense, tech(bfgs) 

	mlogit intervention2 offense defense ln_distance icontr tcontr i_win i_demdiff t_demdiff, tech(bfgs)

* Table A6
	
	mlogit intervention offense defense if warnum~=55 & warnum~=106 & warnum~=139 & warnum~=151 & warnum~=211, tech(bfgs) 

	mlogit intervention offense defense ln_distance icontr tcontr i_win i_demdiff t_demdiff if warnum~=55 & warnum~=106 & warnum~=139 & warnum~=151 & warnum~=211, tech(bfgs)
	
* Table A7

	mlogit intervention offense defense i_depend t_depend, tech(bfgs) 

	mlogit intervention offense defense ln_distance icontr tcontr i_win i_demdiff t_demdiff i_depend t_depend, tech(bfgs)
	
* Table A8
	
	mlogit intervention offense defense, tech(bfgs) 

	mlogit intervention offense defense ln_distance icontr tcontr i_win i_demdiff t_demdiff, tech(bfgs)

	mlogit intervention offense defense if e(sample), tech(bfgs)
	
* Table A9

	mlogit intervention offense defense ln_distance icontr tcontr i_win i_demdiff t_demdiff i_jtrel t_jtrel, tech(bfgs)

	mlogit intervention offense defense ln_distance icontr tcontr i_win i_demdiff t_demdiff i_jtlin t_jtlin, tech(bfgs)

* Table A10

	mlogit intervention offense defense ln_distance icontr tcontr i_win i_demdiff t_demdiff i_jteth t_jteth, tech(bfgs)

	mlogit intervention offense defense ln_distance icontr tcontr i_win i_demdiff t_demdiff i_jtrel t_jtrel i_jtlin t_jtlin i_jteth t_jteth, tech(bfgs)
